function [ W, sigma, C ] = lazyRBF_training( data, label, sigma )
%LAZERBF_TRAINING Summary of this function goes here
%   Detailed explanation goes here
    if nargin < 3
       sigma = 1; 
    end

    n_data = size(data,1);
    C = data;
    
    % make kernel matrix
    k_mat = zeros(n_data);
    for i=1:n_data
       L2 = sum((data - repmat(data(i,:), n_data, 1)).^2, 2);
       k_mat(i,:) = exp(L2'/(2*sigma));
    end
    
    W = k_mat\label;
end

